/* 基础样式 - 蓝色系主题 */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f9ff 0%, #e6f0ff 100%);
    margin: 0;
    padding: 20px;
    color: #2c3e50;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(13, 71, 161, 0.2);
    color: white;
}

header h1 {
    color: white;
    font-size: 2.5rem;
    margin: 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 卡片样式 - 现代蓝色卡片 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(41, 128, 185, 0.15);
    margin-bottom: 25px;
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(41, 128, 185, 0.2);
}

.card-header {
    padding: 18px 25px;
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    border-bottom: none;
}

.card-body {
    padding: 25px;
    background: #f8fbff;
}

/* 输入组样式 */
.input-group {
    display: flex;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(41, 128, 185, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.input-group input {
    flex: 1;
    padding: 14px;
    border: 1px solid #e3f2fd;
    border-right: none;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #64b5f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

.input-group button {
    padding: 14px 20px;
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 8px 8px 0;
}

.input-group button:hover {
    background: linear-gradient(135deg, #3b78e7 0%, #1669d6 100%);
    transform: translateY(-2px);
}

.current-user {
    margin-top: 15px;
    font-size: 15px;
    color: #4285f4;
    background: #e3f2fd;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
}

/* 购物车项样式 - 现代卡片设计 */
.cart-item {
    display: flex;
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #e3f2fd;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.cart-item:hover {
    box-shadow: 0 6px 15px rgba(66, 133, 244, 0.15);
    transform: translateY(-3px);
    border-color: #bbdefb;
}

.item-image {
    width: 140px;
    height: 140px;
    margin-right: 25px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #e3f2fd;
    box-shadow: 0 3px 8px rgba(66, 133, 244, 0.1);
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.item-details {
    flex-grow: 1;
    padding: 5px;
}

.item-name {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a237e;
    font-size: 1.3rem;
    font-weight: 600;
}

.item-info {
    margin: 12px 0;
    display: flex;
    align-items: center;
}

.item-label {
    font-weight: 600;
    margin-right: 8px;
    color: #5c6bc0;
    min-width: 60px;
}

.item-price {
    color: #e53935;
    font-weight: bold;
    font-size: 1.1rem;
}

.item-subtotal {
    color: #1a237e;
    font-weight: bold;
    font-size: 1.2rem;
}

.item-quantity {
    display: flex;
    align-items: center;
    margin: 18px 0;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #64b5f6 0%, #42a5f5 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(66, 133, 244, 0.2);
}

.quantity-btn:hover {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.quantity-value {
    margin: 0 18px;
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
    color: #1a237e;
}

.item-actions {
    margin-top: 20px;
}

.action-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(229, 57, 53, 0.2);
}

.action-btn:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

/* 汇总样式 - 蓝色渐变卡片 */
.summary {
    margin-top: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.total-items, .total-price {
    font-size: 1.2rem;
    font-weight: 500;
}

.total-items i, .total-price i {
    margin-right: 12px;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
}

.btn-danger {
    padding: 12px 25px;
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(229, 57, 53, 0.3);
}

.btn-primary {
    padding: 14px 30px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #43a047 0%, #1b5e20 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
}

/* 空购物车状态 */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #5c6bc0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(66, 133, 244, 0.1);
    margin: 20px 0;
}

.empty-cart i {
    font-size: 70px;
    color: #bbdefb;
    margin-bottom: 25px;
}

.empty-cart h2 {
    margin: 15px 0;
    color: #1a237e;
    font-size: 1.8rem;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(66, 133, 244, 0.1);
    margin: 20px 0;
}

.loading i {
    font-size: 50px;
    color: #4285f4;
    margin-bottom: 25px;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 购物车操作按钮区域 */
.cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 0;
}

/* 按钮悬停效果增强 */
button {
    transition: all 0.3s ease !important;
}

button:hover {
    transform: translateY(-3px) !important;
}